// project imports
import MainLayout from '@/layout/MainLayout'
import Loadable from '@/ui-component/Loadable'

// sample page routing
const Schedule = Loadable(lazy(() => import('@/views/star-manage/schedule/Index')))
const Service = Loadable(lazy(() => import('@/views/star-manage/service/Index')))
const ConfShift = Loadable(lazy(() => import('@/views/star-manage/conf/shift/Index')))
const ConfGrade = Loadable(lazy(() => import('@/views/star-manage/conf/grade/Index')))
const Performance = Loadable(lazy(() => import('@/views/star-manage/performance/Index')))
const Salary = Loadable(lazy(() => import('@/views/star-manage/salary/Index')))
const Overview = Loadable(lazy(() => import('@/views/star-manage/overview/Index')))
const Dashboard = Loadable(lazy(() => import('@/views/dashboard/Index')))
const Chat = Loadable(lazy(() => import('@/views/chat/Index')))

// ==============================|| MAIN ROUTING ||============================== //

const MainRoutes = {
  path: '/',
  element: <MainLayout />,
  children: [
    {
      path: '/',
      element: <Dashboard />
    },
    {
      path: 'dashboard',
      element: <Dashboard />
    },
    {
      path: 'star-manage',
      children: [
        {
          path: 'service',
          element: <Service />
        },
        {
          path: 'schedule',
          element: <Schedule />
        },
        {
          path: 'performance',
          element: <Performance />
        },
        {
          path: 'overview',
          element: <Overview />
        },
        {
          path: 'salary',
          element: <Salary />
        },
        {
          path: 'conf',
          children: [
            { path: 'shift', element: <ConfShift /> },
            { path: 'grade', element: <ConfGrade /> }
          ]
        }
      ]
    },
    {
      path: 'chat',
      element: <Chat />
    }
  ]
}

export default MainRoutes
